<?php

namespace App\Models;


use Dcat\Admin\Models\Administrator;
use Illuminate\Database\Eloquent\Model;

class WorkOrderOperationLog extends Model
{
	
    protected $table = 'work_order_operation_logs';

    protected $fillable = [
        'user_id',
        'work_order_id',
        'processes_archives_id',
        'content',
        'operation_id',
    ];

    public function processesArchives()
    {
        return $this->belongsTo(ProcessesArchive::class);
    }

    public function workOrder()
    {
        return $this->belongsTo(WorkOrder::class);
    }

    public function user()
    {
        return $this->belongsTo(Administrator::class);
    }

    public function operation()
    {
        return $this->belongsTo(Administrator::class, 'operation_id');
    }
}
